import React, { useState } from 'react';
import Xzbutton from './components/XzButton';

const App = () => {
  let [showChild, setShowChild] = useState(false)
  return (
    <div>
      <h3>这里是根组件</h3>
      <button onClick={()=>setShowChild(!showChild)}>挂载卸载了子组件XzButton</button>
      <hr/>
      
      {showChild && (<Xzbutton></Xzbutton>)}
    </div>
  );
}

export default App;
